Added support for multiple user-specified applications to be run in integration tests - #168
Added support for multiple user-specified applications to be run in integration tests#168bieryAtFnal wants to merge 29 commits into
Conversation
…to kbiery/multi_ctrl_proc_support
…le_exclusions' into kbiery/multi_ctrl_proc_support
…grationtest_commandline.py (we now have full run control console output stored in log files).
… to help make their meaning and use more clear; also cleaned up the code and comments a little bit.
…cts like filenames, preferring names of applications instead, since they are more durable.
…sed to all apps that support them, not just the unified shell.
…culating parameterization combinations; removed the unneeded call to check_system_resources in create_config_files
…rationtest_drunc.py
…used in integtests.
Updated links and added code snippets for DAQ session ingredients.
…strings to InformationAboutSpecialVariables.md.
|
|
||
| Here is a snippet of code from the `basic_multapp_test.py` that shows how the `DAQSessionIngredients` are constructed in that integtest: | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Going through the docs (very complete and well written btw, thanks!) and a minor suggestion:
| ``` | |
| ```python |
As this bit of code is Python, flavoring this codeblock with the programming language will allow GitHub to do the linting so it looks more legible.
Example
# The commands to run in dunerc and the process manager shell
dunerc_commands_1 = (
"boot conf start --run-number 101 wait 1 enable-triggers wait ".split()
+ [str(run_duration)] + ["disable-triggers"]
)
dunerc_commands_2 = (
"drain-dataflow stop-trigger-sources stop wait 2 scrap terminate".split()
)
pmshell_command = ["ps"]
vs
# The commands to run in dunerc and the process manager shell
dunerc_commands_1 = (
"boot conf start --run-number 101 wait 1 enable-triggers wait ".split()
+ [str(run_duration)] + ["disable-triggers"]
)
dunerc_commands_2 = (
"drain-dataflow stop-trigger-sources stop wait 2 scrap terminate".split()
)
pmshell_command = ["ps"]| cmd_set_1 = DAQCommandSet("drunc", dunerc_commands_1, CommandWaitParameters(style=CommandWaitStyle.ECHO)) | ||
| cmd_set_2 = DAQCommandSet("pmshell", pmshell_command, CommandWaitParameters(style=CommandWaitStyle.TIME)) | ||
| cmd_set_3 = DAQCommandSet("drunc", dunerc_commands_2, CommandWaitParameters(style=CommandWaitStyle.ECHO)) |
There was a problem hiding this comment.
Can you say a few words in the docs about what DAQCommandSet does and what CommandWaitParaameters refer to and their purpose? the command set looks quite self explanatory from the example but I'm still not sure what the CommandWaitParameters are for, especially the difference between ECHO and TIME
…mpt that appears at the front of an output line.
|
I ran the tests with today's nightly, and the tests behaved as expected. The PM passed, but will be followed up with your PR The only comments I have are on the definition on some of the variables - I struggled to follow some of them. I will give an abridged discussion below. For For Otherwise thank you for this, it looks like it will be very useful. |
Description
In response to a request from Emir for the ability to start a
drunc-process-managerinstance in addition to thedrunc-unified-shellinstance in an integration test, functionality has been added to theintegrationtestinfrastructure to support user-specified applications.This new functionality is controlled by a new special variable that developers can include in their integtests. This new special variable is described in a new document in this repository. This document will eventually describe all of the special variables that can/should be used in integtests, and it can be viewed here.
These changes have been made in a largely backward-compatible way, so most existing regression/integration tests will not need to be changed. However, the status information that is passed back to the integtest/pytest "tests" now has information about all of the control applications that were run in the DAQ session, so integtests that inspect those results will now need to loop over the list of results instead of simply looking at a single status object.
The console output that users will see when they run an integtest with these changes is largely unchanged, but at a verbosity level of 4 or greater, users will now see information about the processes that are started and the commands that are sent to them.
These changes are correlated with the ones in DUNE-DAQ/drunc#997. The changes in the
druncrepo include a new integtest that demonstrates multiple user-specified applications that are run in the DAQ session for the test.One of the reasons for creating this PR in "draft" mode is that there are still some changes needed in the
drunc/process_manager_test.pyin order to get it to work.Here are suggested commands for testing these changes:
Type of change
Testing checklist
dbt-build --unittest)pytest -s minimal_system_quick_test.py)dunedaq_integtest_bundle.sh)Further checks